1. Field of the Invention
This application relates in general to methods for focusing an imaging device and in particular to progressively estimating focus depth for a scene based on depth from defocus.
2. Discussion of Related Art
Many imaging devices employ automatic focus to allow for automatic adjustment of an imaging device to capture image data. For example, one conventional type of automatic focus is based on depth from focus (DFF). Conventional methods of DFF typically capture image data for each focal position of a scene. The sharpness of each focal position may be then analyzed to determine the sharpest focal position, that is the focal position with the highest sharpness metric. As a result of the sharpness determination, the imaging device may automatically set the focus. This approach, however, requires capturing a plurality of images and results in a period of delay during automatic focus. In many instances, the processing delays of DFF do not suit many users of imaging devices, particularly portable imaging device such as digital cameras.
Another approach to automatic focus involves depth from defocus. Conventional methods and devices employing depth from defocus are typically limited to stationary imaging devices. Further, these methods generally require modeling of blur information in order to determine automatic focus. As a result, parameters of the imaging device must be determined for each zoom and aperture state to allow for automatic focus. U.S. Ser. No. 12/857,343 cited above addresses these difficulties, and provides a process for estimating focus depth based on depth from defocus that correlates the amount of object blur and correct object distance. That application also provides a confidence level for the estimated depth.
Two other problems appear when using depth from defocus methods for the purpose of depth estimation. The first problem has to do with the inherent ambiguity of determining depth from defocus. Ambiguity results from the fact that the amount of blur for an object located in front of the focusing position and the amount of blur for the same object located behind the focusing position might be the same. Therefore, depth estimation which is based on a single defocus measurement is ambiguous. The second problem is the reliability problem due to the difficulty in accurately measuring the amount of blur for a given scene. It would be advantageous to provide a solution that overcomes these deficiencies.